<template>
  <div>
   
    <Show  :count='count'></Show>
    <Button @increment='increment' 
    @decrement='decrement' 
    @inputCount='inputCount' 
   
    :count='count'
    ></Button>
  </div>
</template>

<script>
import Show from './Show.vue'
import Button from "./Button.vue"
export default {
    components:{
      Show,
      Button,
      
    },
    data(){
        return {
            count:1,
        }
    },
    methods:{
        // increment(){
        //     this.count++;
        //     console.log(count)
        // },
        decrement(){
          this.count--;
        },
        inputCount(newCount){
            this.count=newCount-0
        },
        increment(num){
         this.count=num
        }
        
    }
}
</script>

<style>
</style>